<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" charset="UTF-8">var projectPath = "<%= basePath%>";</script>
<script type="text/javascript" src="<%=basePath %>/resource/js/common-css-js.js" charset="UTF-8"></script>
<title>修改供应商</title>
</head>
<body>
  <form class="layui-form panel-body">
	  <input type="hidden" name="supArchiId" />
	  <div class="layui-form-item">
	    <input type="text" name="supArchiEnterpriseName" lay-verify="required|enterpriseName" placeholder="公司名称" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiLinkMan" lay-verify="required|peopleName" placeholder="联系人" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <select name="supArchiSex" lay-verify="required">
		     <option value="男">男</option>
		     <option value="女">女</option>
		 </select>
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiBirthday" lay-verify="birthday" class="layui-input" id="birthday" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiLinkTel" lay-verify="tel" placeholder="联系电话" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiLinkPhone" lay-verify="required|phone" placeholder="联系手机" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiEmail" lay-verify="myemail" placeholder="电子邮箱" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiZipCode" lay-verify="postcode" placeholder="邮编" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiFax" lay-verify="fax" placeholder="传真" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiQq" lay-verify="qq" placeholder="QQ" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiWechat" lay-verify="wechat" placeholder="微信" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiLinkAddress" lay-verify="required" placeholder="联系地址" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <select id="supArchiCustomerClass" name="supArchiCustomerClass" lay-verify="required"></select>
	  </div>
	  <div class="layui-form-item">
	    <select id="supArchiCustomerLv" name="supArchiCustomerLv" lay-verify="required"></select>
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiProduct" lay-verify="required" placeholder="产品范围" autocomplete="off" class="layui-input" />
	  </div>
	  <div class="layui-form-item">
	    <input type="text" name="supArchiRemark" placeholder="备注" autocomplete="off" class="layui-input" />
	  </div>
	  <%@include file="/admin/commonsPage/submit-reset.html" %>
  </form>
  <script type="text/javascript">
 	laydate.render({elem: '#birthday'});
  	var rows = parent.cTable.bootstrapTable('getSelections'); 
	var sexElement = $("option[value='"+rows[0].supArchiSex+"']").attr("selected",true);
  	renderSelectOptionByKeyValue($("#supArchiCustomerLv"),parent.arrayKeyMap.supplierLv,rows[0].supArchiCustomerLv);
  	renderSelectOptionByKeyValue($("#supArchiCustomerClass"),parent.arrayKeyMap.supplierClass,rows[0].supArchiCustomerClass);
  	for(key in rows[0]){
  		$("input[name='"+key+"']").val(rows[0][key]);
  	}
  	form.render();
  	requestUpdateData("/procurement/supplier-archives");
  </script>
</body>
</html>